Repository navigation
Conversation
Whole-row reads of reports, report runs and budget-window runs name none of the per-user columns a later revision drops, the tables keep them, run reads no longer answer a trigger, and create_report_run takes none. The report fixtures stop storing those columns, so the reads are tested on rows that hold none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report leaves out label, description and user_id, and ReportRun and BudgetWindowRun leave out trigger, so API v1 neither selects nor writes them. The tables keep the columns, so there is no revision, and a release of this code keeps serving /v2/reports while a later revision drops them. Run items and budget-window run items no longer have a trigger field, and create_report_run takes none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # policyengine_api/data/v2/models/reports.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A catalog publication test stops passing a label the model discards, and a report-run test is named for what it now covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2plan/c1-40-report-cliffs #4333 +/- ##
==============================================================
- Coverage 93.63% 93.61% -0.02%
==============================================================
Files 409 409
Lines 23366 23352 -14
Branches 3657 3656 -1
==============================================================
- Hits 21878 21862 -16
- Misses 874 875 +1
- Partials 614 615 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… v2plan/c1-40a-stop-mapping-report-columns
… v2plan/c1-40a-stop-mapping-report-columns
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4332
Summary
Reportno longer mapslabel,descriptionoruser_id, andReportRunandBudgetWindowRunno longer maptrigger. The columns stay in__table_args__, so the tables don't change and there is no revision.Report.userandUser.reportsgo, andcreate_report_runtakes no trigger./v2/reportsrun items and budget-window run items no longer havetrigger. Run lists, report reads, and create and re-run answers all change. A user's trigger stays onuser_report_run_associations.Why it ships separately
The deploy upgrades the v2 schema before new code takes traffic. The next revision, in the PR that follows this one, drops these columns and
report_runs' four cliff columns, so the release serving at that moment must name none of them. With #4329, which stops mapping the four cliff columns, this release is that one.Deploy order
Migration notes
/v2/reports, on FastAPI. Nothing moves between Flask and FastAPI.triggerfield is removed from run items. v3 has it only in its generated types and calls no/v2/reportsroute.Testing
privileges.pyno longer naming the cliff columns, 30 report read, create and re-run cases pass.alembic -c alembic-v2.ini checkfinds nothing to generate, andreconcile_v2_privileges.py applyandverifypass.lint-imports,python -m scripts.rules validate,run_quality_guards.pyandmake typecheck-v2pass. Explicit mypy on the changedpolicyengine_api/data/v2/files reports 20 errors, the same count as the base branch.🤖 Generated with Claude Code